#ifndef __CM__
#define __CM__
#include "Type_Define.h"
#include "IO_LINK_Global_Param.h"
#include "SMI.h"
typedef enum{
 CM_CheckPortMode_0,
 CM_SM_Startup_1,
 CM_DS_ParamManager_2,
 CM_PortFault_3,
 CM_WaitingOnOperate_4,
 CM_Port_Active_5,
 CM_Port_DIDO_6,
 CM_Port_Deactived_8
}CM_STATE_TYPE;

extern CM_STATE_TYPE CM_STATE[PORT_NUM];


void Event_CM_PortConfigList_changed(uint8_t Port);

void Event_SM_PortMode_COMREADY(uint8_t Port);
void Event_SM_PortMode_xFAULT(uint8_t Port);
void Event_SM_PortMode_COMLOST(uint8_t Port);
void Event_SM_PortMode_OPERATE(uint8_t Port);


extern PortConfigList_TYPE CM_PortConfigList[PORT_NUM]; //端口运行时配置

void Action_do_ModeCheck(uint8_t Port);
#endif

